//
//  MBProgressHUD+ATAdd.h
//  Postre
//
//  Created by CoderLT on 2017/5/24.
//  Copyright © 2017年 CoderLT. All rights reserved.
//

#import <MBProgressHUD/MBProgressHUD.h>

#define MBHudShowMaxDuration (30)
#define MBHudHideDelay       (1)

@interface MBProgressHUD (ATAdd)
+ (UIView *)defaultView;
+ (UIImage *)defaultSuccessImage;
+ (UIImage *)defaultFailureImage;

+ (MBProgressHUD *)showMessage:(NSString *)message;
+ (MBProgressHUD *)showMessage:(NSString *)message toView:(UIView *)view;
+ (MBProgressHUD *)showWithCompletion:(void (^NS_NOESCAPE)(MBProgressHUD *hud))completion;
+ (MBProgressHUD *)showToView:(UIView *)view
                   completion:(void (^NS_NOESCAPE)(MBProgressHUD *hud))completion;
+ (MBProgressHUD *)showMessage:(NSString *)message
                    completion:(void (^NS_NOESCAPE)(MBProgressHUD *hud))completion;
+ (MBProgressHUD *)showMessage:(NSString *)message
                        toView:(UIView *)view
                    completion:(void (^NS_NOESCAPE)(MBProgressHUD *hud))completion;
+ (MBProgressHUD *)showMessage:(NSString *)message
                        toView:(UIView *)view
                hideAfterDelay:(NSTimeInterval)delay
                    completion:(void (^NS_NOESCAPE)(MBProgressHUD *hud))completion;


- (void)hideWithMessage:(NSString *)message completion:(MBProgressHUDCompletionBlock)completion;
- (void)hideWithSuccess:(NSString *)message completion:(MBProgressHUDCompletionBlock)completion;
- (void)hideWithFailure:(NSString *)message completion:(MBProgressHUDCompletionBlock)completion;
- (void)hideWithAnimated:(BOOL)animated completion:(MBProgressHUDCompletionBlock)completion;
- (void)hideWithMessage:(NSString *)message
                  image:(UIImage *)image
               animated:(BOOL)animated
                  delay:(NSTimeInterval)delay
             completion:(MBProgressHUDCompletionBlock)completion;
@end
